Product Code Database
Example Keywords: slacks -ornament $27
   » » Help: Pipe Trick
Tag Help 'Pipe Trick'.
Tag
The pipe trick uses the ("") to save typing the label of a for several kinds of . This can avoid potentially making an error while typing the label.

When the last character of a link is the pipe character, the pipe trick will automatically generate the text that displays for that link. It removes the parenthesized part of the link title, but it also processes commas in the title, and prefixes. The generated text is saved with the rest of the page's .

The pipe trick doesn't work in edit summaries, within <ref> tags, or links to sections – .


Examples
Article titles | style="width: 33%; vertical-align: top" Pages in other namespaces


Combinations
The basic rule when the pipe trick is used is that an (initial) prefix, a final part beginning with a comma, or a final parenthesis (usually intended for disambiguation) is suppressed in the rendering of the link. The rendered text is case neutral and so should be entered precisely as the user wishes it to appear in the article. In case of combinations of suppressible parts, the following rules apply:


Commas beat parentheses
If the link name involves both one or more commas and a final parenthesis, only the parenthesis is suppressed:
is shown on the page as:
| style="vertical-align: top; padding: 1em;"

Only one prefix suppressed
If there are several prefixes, which can occur, for example, for an , only the first is suppressed:
is rendered as:

Only the first comma
If there are several commas, only the part up to the first comma is shown:
results in:
| style="vertical-align: top; padding: 1em;"

Other combinations
For the rest, if there is both an initial part and a final part that can be omitted, both are suppressed:
produces:


Where it doesn't work
Where the pipe trick doesn't work, the link must be written out in full manually.


<ref> footnotes and <gallery> tags
The trick does not work when enclosing between or .
renders in the references list (generated by the [[Pipe (computing)|]] tag) as:


Edit summaries
The trick does not work in edit summaries.

renders in the edit history as:
( summaries and the pipe trick: as tested in )


Section links
The pipe trick does not work on , and in general it does not work for links to anchors (links that use a sign). For example,
does not give you any wikilink. See , "[[Boston, Massachusetts|]]".


Related tricks

Slash trick
You can achieve a similar effect for by adding a slash.

generates:

Unlike the pipe trick, though, the slash trick is not expanded in the saved .

This trick only works in namespaces where subpages are enabled.


Reverse pipe trick
If the title of the article you are editing includes a parenthesized term or a comma, placing a pipe at the start of a link will append that parenthesized text to the link target, but not display it.

For example, if the link

were placed in , the link would be expanded to

Placing a pipe at the start of a link to an article that has no parentheses or comma in its title will have no effect.


Alternatives
Some templates are available as alternatives to using the trick for linking.
(shortcut: )
     


See also

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
9/10 Page Rank
1497 Page Refs
1s Time